package com.behelpful.demo.admin.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 路由信息持久化存储管理
 *
 * @author Alay
 * @date 2021-09-04 23:56
 * @since
 */
@Data
@ApiModel(value = "路由信息持久化存储管理")
@EqualsAndHashCode(callSuper = true)
@TableName(value = "gateway_route")
public class GatewayRouteInDb extends Model<GatewayRouteInDb> {
    private static final long serialVersionUID = 1L;

    /**
     * 数据库主键Id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "数据库主键Id")
    private Integer id;

    /**
     * 路由Id
     */
    @ApiModelProperty(value = "路由Id")
    private String routeId;
    /**
     * 路由名称
     */
    @ApiModelProperty(value = "路由名称")
    private String routeName;

    /**
     * 断言
     */
    @ApiModelProperty(value = "断言")
    private String predicates;

    /**
     * 过滤器
     */
    @ApiModelProperty(value = "过滤器")
    private String filters;

    /**
     * uri
     */
    @ApiModelProperty(value = "请求uri")
    private String uri;

    /**
     * 元数据
     */
    @ApiModelProperty(value = "元数据")
    private String metadata;

    /**
     * 排序
     */
    @TableField(value = "`order`")
    @ApiModelProperty(value = "排序值")
    private Integer order = 0;

    /**
     * 逻辑删除
     */
    @TableLogic
    @TableField(select = false)
    @ApiModelProperty(value = "逻辑删除")
    private Boolean isDelete;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

}
